// 这个文件用于封装自定义hook.将注册和登录组件中出现的相同的代码封装起来
import { useState } from 'react'
export default function useFn() {
  const [username, setUsername] = useState('')
  const [password, setPassword] = useState('')
  const [repassword, setRePassword] = useState('')

  const handle = (e) => {
    setUsername(e.target.value)
  }
  const pswHandle = (e) => {
    setPassword(e.target.value)
  }
  const rePswHandle = (e) => {
    setRePassword(e.target.value)
  }
  return { username, password, repassword, handle, pswHandle, rePswHandle }
}
